import type { Candidate, CandidateDto } from '@/types';
import request from '@/utils/request';

export const queryCandidate = async (params?: CandidateDto) => {
    const res = await request.post('/candidate/queryCandidate',{
        ...params
    });
    return res.data;
}

export const queryCandidateByIds = async (canididateIdList?: string[]) => {
    const res = await request.post('/candidate/queryCandidateByIds',canididateIdList);
    return res.data;
}


export const addCandidate = async (params?: Candidate) => {
    const res = await request.post('/candidate/addCandidate',{
        ...params
    });
    return res.data;
}

export const editCandidate = async (params?: Candidate) => {
    const res = await request.post('/candidate/editCandidate',{
        ...params
    });
    return res.data;
}

export const deleteCandidate = async (candidateIds: string[]) => {
    const res = await request.post('/candidate/deleteCandidate',candidateIds);
    return res.data;
}